package com.wzy.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author wzy
 * @Date: 2022/1/25 10:18
 * @Description:
 */
@TableName("sys_user")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysUser extends Model<SysUser> {

    /**
     *  注解 @ExcelProperty(value = String[], index = int):
     * 设置表头信息
     * value: 表名称
     * index: 列号
     */
    //用户ID
    // @TableId(type = IdType.ID_WORKER_STR)
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    // @ExcelProperty(value = "ID", index = 0)
    private String userId;
    //部门ID
    @TableField("dept_id")
    @ExcelProperty(value = "部门id", index = 0)
    private Integer deptId;
    //登录账号
    @TableField("login_name")
    @ExcelProperty(value = "登录账号", index = 1)
    private String loginName;
    //用户昵称
    @TableField("user_name")
    @ExcelProperty(value = "用户昵称", index =2)
    private String userName;
    //用户邮箱
    @TableField("email")
    @ExcelProperty(value = "用户邮箱", index = 3)
    private String email;
    //手机号码
    @TableField("phone_number")
    @ExcelProperty(value = "用户手机号", index = 4)
    private String phoneNumber;
    //用户性别:0男,1女
    @TableField("sex")
    @ExcelProperty(value = "用户性别", index = 5)
    private String sex;
    //头像路径
    // @ExcelProperty(value = "头像地址", index = 7)
    @TableField("avatar")
    private String avatar;
    //帐号状态:0正常,1禁用
    @ExcelProperty(value = "账户状态", index = 6)
    @TableField("status")
    private Integer status;
    //密码
    @TableField("password")
    @ExcelProperty(value = "密码", index = 7)
    private String password;
    //类型:Y默认用户,N非默认用户
    @TableField("user_type")
    @ExcelProperty(value = "用户类型", index = 8)
    private String userType;
    //盐加密
    @TableField("salt")
    // @ExcelProperty(value = "盐", index = 9)
    private String salt;
    //拒绝登录描述
    @TableField("refuse_des")
    // @ExcelProperty(value = "拒绝登录描述", index = 11)
    private String refuseDes;
    //创建者
    @TableField("create_by")
    private String createBy;
    //创建时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;
    //更新者
    @TableField("update_by")
    private String updateBy;
    //更新时间
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;



}
